//
//  LJFsortHeadView.m
//  SevenZhou
//
//  Created by qianfeng on 15/9/24.
//  Copyright (c) 2015年 ljf. All rights reserved.
//

#import "LJFsortHeadView.h"

@implementation LJFsortHeadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (IBAction)click1:(id)sender
{
    [_coutryButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_contentButton setTitleColor:[UIColor colorWithRed:15/255.0 green:142/255.0 blue:31/255.0 alpha:1.0] forState:UIControlStateNormal];
    
    [_mydelegate sortHeadView:self andoffset:0];
}


- (IBAction)click2:(id)sender
{
    [_contentButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_coutryButton setTitleColor:[UIColor colorWithRed:15/255.0 green:142/255.0 blue:31/255.0 alpha:1.0] forState:UIControlStateNormal];
    [_mydelegate sortHeadView:self andoffset:1];
}


-(void)setName2:(NSString *)name2
{
    _name2 = name2;
    
    if (_name1.length > 0)
    {
        [self.contentButton setTitle:_name1 forState:UIControlStateNormal];
        _img1.hidden = NO;
    }
    
    if (_name2.length > 0)
    {
        [self.coutryButton setTitle:_name2 forState:UIControlStateNormal];
        _img2.hidden = NO;
        _coutryButton.hidden = NO;
    }
}

@end
